<template>
  <div class="my-data">
    <!---->
    <div class="el-card is-always-shadow" style="margin: 0px;">
      <!---->
      <div class="el-card__body">
        <div class="header">
          个人资料
          <a href="#" class>
            <div class="header-r">
              <i class="el-icon-edit-outline"></i>
              <span>修改</span>
            </div>
          </a>
        </div>
        <div class="content">
          <div class="list" style="width: 430px; border-right: 1px solid rgb(246, 249, 255);">
            <div class="item">
              <div class="label">姓名</div>
              <div class="text">张永春</div>
            </div>
            <div class="item">
              <div class="label">年龄</div>
              <div class="text">23</div>
            </div>
            <div class="item">
              <div class="label">手机号</div>
              <div class="text">185****027</div>
            </div>
            <div class="item">
              <div class="label">毕业院校</div>
              <div class="text">清华大学</div>
            </div>
            <div class="item">
              <div class="label">学历</div>
              <div class="text">博士</div>
            </div>
          </div>
          <div class="list" style="width: 390px; border-right: 1px solid rgb(247, 247, 247);">
            <div class="item">
              <div class="label">性别</div>
              <div class="text">男</div>
            </div>
            <div class="item">
              <div class="label">身份证号</div>
              <div class="text">46999225</div>
            </div>
            <div class="item">
              <div class="label">QQ</div>
              <div class="text">198532</div>
            </div>
            <div class="item">
              <div class="label">毕业状态</div>
              <div class="text">在读</div>
            </div>
            <div class="item"></div>
          </div>
          <div class="update">
            <!---->
            <img
              @click="open"
              src="https://pic.baike.soso.com/ugc/baikepic2/0/ori-20170119152504-1206593448.jpg/800"
            >
            <input
              type="file"
              id="file"
              accept=".jpg, .png, .gif, .jpeg, .bmp"
              style="height: 0px;"
            >
            <button @click="file">修改头像</button>
            <button @click="gfile">修</button>
          </div>
        </div>
      </div>
    </div>
    <div class="el-card is-always-shadow">
      <div class="el-card__body">
        <div class="header">部门资料</div>
        <div class="content">
          <div class="list list1">
            <div class="item">
              <div class="label">班级</div>
              <div class="text">西安JavaEE就业班2105期</div>
            </div>
            <div class="item">
              <div class="label">学号</div>
              <div class="text">XA201127286</div>
            </div>
            <div class="item">
              <div class="label">预计毕业日期</div>
              <div class="text">2021-11-12</div>
            </div>
            <div class="item">
              <div class="label">招生老师</div>
              <div class="text">王旭东</div>
            </div>
            <div class="item">
              <div class="label">学分</div>
              <div class="text">
                <a href="/index/violation" class>100</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="el-dialog__wrapper" style="display: none;">
      <div
        role="dialog"
        aria-modal="true"
        aria-label="dialog"
        class="el-dialog"
        style="margin-top: 15vh; width: 80%;"
      >
        <div class="el-dialog__header">
          <span class="el-dialog__title"></span>
          <button type="button" aria-label="Close" class="el-dialog__headerbtn">
            <i class="el-dialog__close el-icon el-icon-close"></i>
          </button>
        </div>
        <!---->
        <!---->
      </div>
    </div>
    <!-- 添加模态框 -->
    <el-dialog :visible.sync="dialogFormVisible">
      <img
        style="width:500px;heigth:600px"
        src="https://pic.baike.soso.com/ugc/baikepic2/0/ori-20170119152504-1206593448.jpg/800"
      >
    </el-dialog>
  </div>
</template>
<style>
.el-main {
  background-color: #fff;
  color: #333;
  text-align: center;
  line-height: 0px;
  height: 1000px;
}
.my-data {
  font-size: 13px;
}
.el-card.is-always-shadow,
.el-card.is-hover-shadow:focus,
.el-card.is-hover-shadow:hover {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}
.el-card .el-card__body {
  padding: 0;
}
.el-card .header {
  height: 40px;
  line-height: 40px;
  border-bottom: 1px solid #d8d8d8;
  padding: 0 13px;
  font-weight: 700;
}
.header {
  position: relative;
}
.my-data .header-r {
  float: right;
  background-color: #2890ff;
  border-radius: 3px;
  padding: 7px 10px;
  margin: 6px 7px 0 0;
  width: 44px;
  cursor: pointer;
}
.my-data .header-r i {
  color: #fff;
  font-size: 14px;
  float: left;
}
.my-data .header-r span {
  color: #fff;
  float: right;
  height: 14px;
  font-size: 12px;
  line-height: 14px;
}
.my-data .content {
  margin: 10px 13px;
  height: 200px;
  border: 1px solid #f7f7f7;
}
.my-data .content .list {
  width: 100%;
  float: left;
}
.my-data .content .list .item:nth-child(odd) {
  background: #f6f9ff;
}
.my-data .content .list .item {
  height: 40px;
  line-height: 40px;
}
.my-data .content .list .item .label {
  width: 90px;
  padding-left: 20px;
  float: left;
}
.my-data .content .list .item .text {
  float: left;
  font-weight: 500;
}
.my-data .content .update {
  float: left;
  width: 140px;
  height: 0px;
  margin-left: 50px;
  margin-top: 10px;
}
.my-data .content .update img {
  width: 140px;
  height: 160px;
}
.my-data .content .update button {
  width: 96px;
  height: 32px;
  background: #2890ff;
  border-radius: 4px;
  border: 1px solid #2890ff;
  color: #fff;
  display: block;
  cursor: pointer;
  margin: 7px auto 0;
  margin-top: -8px;
}
</style>

<script>
//引入jquery
import $ from "jquery";
export default {
  data() {
    return {
      srcimg: "",
      dialogFormVisible: false,
      formLabelWidth: "120px"
    };
  },
  methods: {
    open() {
      this.dialogFormVisible = true;
    },
    file() {
      var r = $("#file").trigger("click");
      // $("#file").prop("value");
      // if ( $("#file").prop("value") != null ||  $("#file").prop("value") != "") {
      //   alert( $("#file").prop("value"))
      // }
    },
    gfile() {
      alert(document.getElementById("file").value);
      alert($("#file").prop("src"));
      // this.srcimg = $("#file").prop("value");
    }
  }
};
</script>
